package com.ruoyi.Warehouse.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.Warehouse.mapper.InventoryalertsMapper;
import com.ruoyi.Warehouse.domain.Inventoryalerts;
import com.ruoyi.Warehouse.service.IInventoryalertsService;
import com.ruoyi.common.core.text.Convert;

/**
 * 库存预警设置表Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-16
 */
@Service
public class InventoryalertsServiceImpl implements IInventoryalertsService 
{
    @Autowired
    private InventoryalertsMapper inventoryalertsMapper;

    /**
     * 查询库存预警设置表
     * 
     * @param alertId 库存预警设置表主键
     * @return 库存预警设置表
     */
    @Override
    public Inventoryalerts selectInventoryalertsByAlertId(Long alertId)
    {
        return inventoryalertsMapper.selectInventoryalertsByAlertId(alertId);
    }

    /**
     * 查询库存预警设置表列表
     * 
     * @param inventoryalerts 库存预警设置表
     * @return 库存预警设置表
     */
    @Override
    public List<Inventoryalerts> selectInventoryalertsList(Inventoryalerts inventoryalerts)
    {
        return inventoryalertsMapper.selectInventoryalertsList(inventoryalerts);
    }

    /**
     * 新增库存预警设置表
     * 
     * @param inventoryalerts 库存预警设置表
     * @return 结果
     */
    @Override
    public int insertInventoryalerts(Inventoryalerts inventoryalerts)
    {
        return inventoryalertsMapper.insertInventoryalerts(inventoryalerts);
    }

    /**
     * 修改库存预警设置表
     * 
     * @param inventoryalerts 库存预警设置表
     * @return 结果
     */
    @Override
    public int updateInventoryalerts(Inventoryalerts inventoryalerts)
    {
        return inventoryalertsMapper.updateInventoryalerts(inventoryalerts);
    }

    /**
     * 批量删除库存预警设置表
     * 
     * @param alertIds 需要删除的库存预警设置表主键
     * @return 结果
     */
    @Override
    public int deleteInventoryalertsByAlertIds(String alertIds)
    {
        return inventoryalertsMapper.deleteInventoryalertsByAlertIds(Convert.toStrArray(alertIds));
    }

    /**
     * 删除库存预警设置表信息
     * 
     * @param alertId 库存预警设置表主键
     * @return 结果
     */
    @Override
    public int deleteInventoryalertsByAlertId(Long alertId)
    {
        return inventoryalertsMapper.deleteInventoryalertsByAlertId(alertId);
    }
}
